#include<stdio.h>
#include<unistd.h>

int main()
{
    const char* ar = "/-|\\";
    char arr[102] ={ 0 };
    int i = 0;
    for ( i = 0; i <= 100; i++)
    {
        printf("[%-101s][%d%%] %c\r", arr, i, ar[i%4]);
        fflush(stdout);
        usleep(100000);
        arr[i] = '=';
    }
    printf("\n");
        return 0;
    }
